package com.wsh.consumption.controller;

import feign.hystrix.FallbackFactory;
import lombok.extern.slf4j.Slf4j;

import org.springframework.stereotype.Component;

/**
 * @Author: WSHannn
 * @Description TODO
 * @CreateDate: 2019/6/5 14:28
 **/
@Component
@Slf4j
public class ProviderHystric implements FallbackFactory<ProviderApi> {

    @Override
    public ProviderApi create(Throwable cause) {
        return new ProviderApi() {
            @Override
            public String info() {
                log.info("超时了。。。。。。。。。。。。。");
                return "";
            }
        };
    }
}
